<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="cn.edu.cqvie.ssm.entity.User"%>
<%@ page import="cn.edu.cqvie.ssm.model.UserModel" %>
<%@ page import="cn.edu.cqvie.ssm.model.impl.UserModelImpl"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>用户列表</title>
</head>
<body>
	<%
		UserModel um = new UserModelImpl();
		List<User> list = new ArrayList<User>();
		list = um.selectUser(null);
	%>
	<table border="1" align="center">
		<thead>
			<tr>
				<td colspan="4">用户信息列表</td>
			</tr>
		</thead>
		<tbody>
			<%for (int i = 0; i < list.size(); i++) {
				User u = list.get(i);
			%>
			<tr>
				<td><%=u.getId()%></td>
				<td><%=u.getName()%></td>
				<td><%=u.getPassword()%></td>
				<td>
					<a href="editControl.jsp?action=view&id=<%=u.getId()%>">编辑</a>
					&nbsp;|&nbsp;
					<a href="delete.jsp?id=<%=u.getId() %>">删除</a>
				</td>
			</tr>
			<%}%>
		</tbody>
	</table>
</body>
</html>